@echo off
:: 设置命令行编码为UTF-8
chcp 65001
setlocal enabledelayedexpansion

:: 设置默认提交信息
set commit_msg=update
if not "%~1"=="" (
    set commit_msg=%~1
)

:: 执行git命令
git add .
git commit -m "%commit_msg%"
git push

:: 显示执行结果
if %ERRORLEVEL% EQU 0 (
    echo Git operations completed successfully!
) else (
    echo Git operations failed, please check.
)